package com.spyx.activity.service;

import com.atyx.spyx.model.activity.CouponInfo;
import com.atyx.spyx.model.order.CartInfo;
import com.atyx.spyx.vo.activity.CouponRuleVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 优惠券信息 服务类
 * </p>
 *
 * @author yhp
 * @since 2024-05-21
 */
public interface CouponInfoService extends IService<CouponInfo> {

    IPage<CouponInfo> selectList(Page p1);

    Map<String, Object> findCouponRuleList(Integer id);

    void saveRule(CouponRuleVo couponRuleVo);

    List<CouponInfo> findCouponByKeyword(String keyword);

    List<CouponInfo> findCouponInfo(Long userId, Long skuId);

    List<CouponInfo> findCartCouponInfo(List<CartInfo> cartInfoList, Long userId);

    CouponInfo findRangeSkuIdList(List<CartInfo> cartInfoList, Long couponId);
}
